package cn.ilikes.apps.collect.services.impls;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.ilikes.apps.collect.pojos.IlikesUsers;
import cn.ilikes.apps.collect.services.IIlikesBaseService;
import cn.ilikes.apps.collect.services.IlikesUserService;
import cn.ilikes.apps.collect.services.LikesUserServiceException;

@Component(IlikesUserService.SPRING_DEFULT_NAME)
public class LikesUserService implements IlikesUserService {
	
	@Resource(name=IIlikesBaseService.SPRING_DEFULT_NAME)
	private IIlikesBaseService  llikesBaseService;

	@Override
	public void regUser(IlikesUsers likesUsers) throws LikesUserServiceException {
		llikesBaseService.save(likesUsers);
	}

	@Override
	public IlikesUsers findIlikesUsersByRegUser(String regName) throws LikesUserServiceException {
		IlikesUsers  result=llikesBaseService.get(regName, IlikesUsers.class);
		return result;
	}

	

	
}
